package _thread_lock._lifecycle;

/**
 * @Author: huangya
 * @Date: 2021/01/02
 * @Description:
 */
public class LifecycleTest {

    public static void main(String[] args) {
        ObservableThread observableThread = new ObservableThread<Void>(() -> {
            System.out.println(111);
            return null;
        });
        observableThread.start();



        EmptyTaskLifecycle emptyTaskLifecycle = new EmptyTaskLifecycle(){
            @Override
            public void onFinish(Thread thread, Object result) {
                System.out.println(result);
            }
        };
        ObservableThread observableThread2 = new ObservableThread<String>(emptyTaskLifecycle,() -> {
            System.out.println(222);
            //todo..
            return null;
        });
        observableThread2.start();
    }
}
